home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Tutorial
/
Cookbook
/
01b.hello.slider.Ch3Ex5
/
MyObject.m
< prev
next >
Wrap
Text File
|
1995-06-12
|
508b
|
30 lines
/* Generated by Interface Builder */
#import "MyObject.h"
#import <appkit/Control.h>
#import <strings.h>
#include <stdio.h>
@implementation MyObject
- setTextCell:anObject
{
textCell = anObject;
return self;
}
- slider:sender
{
strcat(myString, "\nhello, world, slider = ");
myFloat = [sender floatValue];
sprintf(tmp, "%f", myFloat);
printf("myFloat = %f, tmp = \"%s\"\n", myFloat, tmp);
strcat(myString, tmp);
[textCell setStringValue:myString];
return self;
}
@end